package model;

import java.io.Serializable;
//import java.util.*;

public class LeaveDTO implements Serializable{

	private String leaveId;
	private String leaveType;
	private String allowTotalDays;
	public String getLeaveId() {
		return leaveId;
	}
	public void setLeaveId(String leaveId) {
		this.leaveId = leaveId;
	}
	public String getLeaveType() {
		return leaveType;
	}
	public LeaveDTO() {
		super();
	}
	public LeaveDTO(String leaveId, String leaveType, String allowTotalDays) {
		super();
		this.leaveId = leaveId;
		this.leaveType = leaveType;
		this.allowTotalDays = allowTotalDays;
	}
	public void setLeaveType(String leaveType) {
		this.leaveType = leaveType;
	}
	public String getAllowTotalDays() {
		return allowTotalDays;
	}
	public void setAllowTotalDays(String allowTotalDays) {
		this.allowTotalDays = allowTotalDays;
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((allowTotalDays == null) ? 0 : allowTotalDays.hashCode());
		result = prime * result + ((leaveId == null) ? 0 : leaveId.hashCode());
		result = prime * result
				+ ((leaveType == null) ? 0 : leaveType.hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		LeaveDTO other = (LeaveDTO) obj;
		if (allowTotalDays == null) {
			if (other.allowTotalDays != null)
				return false;
		} else if (!allowTotalDays.equals(other.allowTotalDays))
			return false;
		if (leaveId == null) {
			if (other.leaveId != null)
				return false;
		} else if (!leaveId.equals(other.leaveId))
			return false;
		if (leaveType == null) {
			if (other.leaveType != null)
				return false;
		} else if (!leaveType.equals(other.leaveType))
			return false;
		return true;
	}
	@Override
	public String toString() {
		return "LeaveDTO [leaveId=" + leaveId + ", leaveType=" + leaveType
				+ ", allowTotalDays=" + allowTotalDays + "]";
	}
	
}
